Skip to content

[Inside Rust] Intro to rustc's self-profile feature #516

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 25, 2020

Conversation

wesleywiser
Copy link
Member

r? @nikomatsakis

cc @michaelwoerister who gave feedback on an earlier draft of this post

@nikomatsakis
Copy link
Contributor

This post is great!

@nikomatsakis
Copy link
Contributor

I'm wondering if this ought to be promoted to the main Rust blog. It feels like the audience is more "people using Rust" than "people developing Rust". I asked this over on Discord, too.

@nikomatsakis
Copy link
Contributor

nikomatsakis commented Feb 14, 2020

We had some brief conversation in Discord on this topic. I think the conclusion was that this could indeed be a nice fit for the main blog, but if so, it could use a bit more of an intro. @wesleywiser how would you feel about adding some sort of intro to help explain to people what this feature is all about?

I was imagining something like this:

We often hear requests to know where compilation time is going. This is useful to use when optimizing the compiler, but also useful to users who want to refactor their crate so that it will compile faster. We've been working on an experimental feature that will help with us. This blog post gives a preview of how it works. Be warned, though: this is still experimental, and we expect the interface to change over time. We'll be adding these examples to the Rust unstable book, as well, and we plan to keep that up to date, so you can always find the latest instructions there.

@wesleywiser
Copy link
Member Author

wesleywiser commented Feb 14, 2020

@nikomatsakis and I chatted a bit about this and we decided not to move it to the main blog at this time. While we both agree that the main blog is perhaps underutilized, I think that this post is a bit too in-the-weeds for the main blog.

Instead, we'd like to run a short series of posts on the main blog advertising the improvements that have been made to Rust compile times over the years as well as the contributors driving those improvements, the current state of things including profiling tools like these and anticipated in-progress or future improvements.

As for this post, I'm going to

  • adapt the into to include a modified version of what @nikomatsakis suggested:

Over the last year, the Self-Profile Working Group has been building tools to profile rustc because we often hear requests to know where compilation time is being spent.
This is useful when optimizing the compiler, but it's also useful to users who want to refactor their crate so that it will compile faster.
We've been working on an experimental feature that will help with that and this blog post gives a preview of how it works.
Be warned, though: it is still experimental and we expect the interface to change over time.
We'll be adding these examples to the Rust unstable book, as well, and we plan to keep that up to date, so you can always find the latest instructions there.

  • update the Rust unstable book with these examples so we can link directly to it in the last sentence. (PR waiting to merge)

  • update the dates in the post to be 2020-02-18 because I do not anticipate having time today or tomorrow to make these changes and @nikomatsakis is out on Monday.

@wesleywiser
Copy link
Member Author

Updated post for today's date.

@nikomatsakis
Copy link
Contributor

Whoops, sorry for delay, merging!

@nikomatsakis nikomatsakis merged commit fb7a506 into rust-lang:master Feb 25, 2020
@wesleywiser wesleywiser deleted the self_profiler branch February 25, 2020 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants